package com.cj.entity;

import java.util.Date;

/**
 * 员工实体类
 */
public class Employee {
    //员工的属性值，跟数据库中emp表中的字段保持一致
    private int id; //编号
    private String workNo;//工作证号
    private String name;//姓名
    private String gender;
    private int age;
    private String idCard;
    private String workAddress;
    private Date entryDate;

    public Employee() {
    }

    public Employee(int id, String workNo, String name, String gender, int age, String idCard, String workAddress, Date entryDate) {
        this.id = id;
        this.workNo = workNo;
        this.name = name;
        this.gender = gender;
        this.age = age;
        this.idCard = idCard;
        this.workAddress = workAddress;
        this.entryDate = entryDate;
    }

    public Employee(String workNo, String name, String gender, int age, String idCard, String workAddress, Date entryDate) {
        this.workNo = workNo;
        this.name = name;
        this.gender = gender;
        this.age = age;
        this.idCard = idCard;
        this.workAddress = workAddress;
        this.entryDate = entryDate;
    }

    public Employee(int id, String workNo, String name, String gender, int age, String idCard, String workAddress) {
        this.id = id;
        this.workNo = workNo;
        this.name = name;
        this.gender = gender;
        this.age = age;
        this.idCard = idCard;
        this.workAddress = workAddress;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getWorkNo() {
        return workNo;
    }

    public void setWorkNo(String workNo) {
        this.workNo = workNo;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getIdCard() {
        return idCard;
    }

    public void setIdCard(String idCard) {
        this.idCard = idCard;
    }

    public String getWorkAddress() {
        return workAddress;
    }

    public void setWorkAddress(String workAddress) {
        this.workAddress = workAddress;
    }

    public Date getEntryDate() {
        return entryDate;
    }

    public void setEntryDate(Date entryDate) {
        this.entryDate = entryDate;
    }

    @Override
    public String toString() {
        return "Employee{" +
                "id=" + id +
                ", workNo='" + workNo + '\'' +
                ", name='" + name + '\'' +
                ", gender=" + gender +
                ", age=" + age +
                ", idCard='" + idCard + '\'' +
                ", workAddress='" + workAddress + '\'' +
                ", entryDate=" + entryDate +
                '}';
    }
}
